<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1 {
            width: 100px;
            height: 100px;
            background-color: antiquewhite;
        }
    </style>
</head>
<body>
    <div class="box1" draggable="true"></div>
    <script>
        var box = document.querySelector(".box1");

        box.ondragstart = function() {
            console.log("draging start");
        }

        box.ondragleave = function() {
            console.log("draging leaving");
        }

        box.ondragend = function() {
            console.log("draging ending");
        }

        box.ondrag = function() {
            console.log("draging...")
        }
    </script>
</body>
</html>